package com.tulele.vtool.service.impl;

import com.tulele.vtool.mapper.NewLookArticleCountInfoMapper;
import com.tulele.vtool.model.NewLookArticleCountInfo;
import com.tulele.vtool.model.combinedEntity.CurDayNewLookStatisInfo;
import com.tulele.vtool.service.INewLookArticleCountInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class NewLookArticleCountInfoServiceImpl implements INewLookArticleCountInfoService {

    @Autowired
    private NewLookArticleCountInfoMapper newLookArticleCountInfoMapper;

    @Override
    public CurDayNewLookStatisInfo getCurDayNewLookStatisInfo(Integer otherUserId) {

        return newLookArticleCountInfoMapper.queryCurDayNewLookStatisInfo(otherUserId);

    }

    @Override
    public NewLookArticleCountInfo getNewLookArticleInfo(NewLookArticleCountInfo newLookArticleCountInfo) {
        return newLookArticleCountInfoMapper.queryNewLookArticleInfo(newLookArticleCountInfo);
    }

    @Override
    public int recordNewLookArticleInfo(NewLookArticleCountInfo newLookArticleCountInfo) {
        return newLookArticleCountInfoMapper.addNewLookArticleInfo(newLookArticleCountInfo);
    }

    @Override
    public int modifyNewLookArticleInfo(NewLookArticleCountInfo newLookArticleCountInfo) {
        return newLookArticleCountInfoMapper.updateNewLookArticleInfo(newLookArticleCountInfo);
    }

    @Override
    public int modifyUserNewLookArticleInfo(NewLookArticleCountInfo newLookArticleCountInfo) {
        return newLookArticleCountInfoMapper.updateUserNewLookArticleInfo(newLookArticleCountInfo);
    }

}
